<template>
  <div class="box">
    <div class="box_header">
      <button @click="login">登录</button>
    </div>
    <div class="box_content">
      <div class="box_aside">
        <el-row class="tac">
          <el-col :span="24">
            <el-menu
              default-active="2"
              class="el-menu-vertical-demo"
              background-color="#545c64"
              text-color="#fff"
              active-text-color="#ffd04b"
              router
            >
              <el-menu-item index="then">
                <i class="el-icon-star-on"></i>
                <span slot="title">首页</span>
              </el-menu-item>

              <el-submenu index="111">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <span>商品</span>
                </template>
                <el-menu-item-group>
                  <el-menu-item index="list">商品管理</el-menu-item>
                  <el-menu-item index="class">品类管理</el-menu-item>
                </el-menu-item-group>
              </el-submenu>

              <el-submenu index="1">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <span>订单</span>
                </template>
                <el-menu-item-group>
                  <el-menu-item index="3-1">订单管理</el-menu-item>
                </el-menu-item-group>
              </el-submenu>

              <el-submenu index="133">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <span>用户</span>
                </template>
                <el-menu-item-group>
                  <el-menu-item index="user">用户列表</el-menu-item>
                </el-menu-item-group>
              </el-submenu>

            </el-menu>
          </el-col>
        </el-row>
      </div>
      <div class="box_main">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  methods:{
    login(){
      this.$router.push('/login')
    }
  }
};
</script>

<style scoped lang="scss">
@import "@/scss/index.scss";
// .box {
//   @include Size(100%, 100%);
// }
.box_header {
  @include SizeBack(98%, 80px, #545c64);
}
.box_content {
  @include Size(98%, 600px);
  display: flex;
  margin-top: 10px;
  justify-content: space-around;
  .box_aside {
    @include SizeBack(18%, 100%, #545c64);
  }
  .box_main {
    @include SizeBack(80%, 100%, #e9eef3);
  }
}
</style>